package train.time0622;

public class No4 {
	
	public static void main(String[] args) {
		int conutN=0;
		for (int n = 1;; n++) {	
				int temp=n;
				while(temp!=0){
					if(temp%10==1){
						conutN++;
					}
					temp/=10;
				}
			if(conutN == n&&n!=1){
				System.out.println(n);
				break;
			}
			//System.out.println(n+","+conutN);
		}
	}

}
